'use strict';
const path = require('path');
const root = path.resolve(__dirname, '..');
const source = path.join(root, 'src', 'javascript', '*.js');
const tasks = path.join(root, 'tasks', '**', '*.js');
const tests = path.join(root, '**', '*Test.js');
const files = [source, tasks, tests];

/**
 * lint js source
 *
 * @method eslint
 */
function eslint(gulp, plugins) {
  return () => gulp.src(files)
    .pipe(plugins.eslint())
    .pipe(plugins.plumber())
    .pipe(plugins.eslint.format());
}
module.exports = eslint;
